<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>添加用户</title>
		<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
	</head>
	<body>
		<center>
			<br><br>
			添加用户:<br><br>
			姓名: <input type="text" name="name" id="name" />&nbsp;&nbsp;
			email: <input type="text" name="email" id="email" />&nbsp;&nbsp;
			电话: <input type="text" name="tel" id="tel" /><br><br>
			<button id="addUser">提交</button>
			<br><br>
			<hr>
			<br><br>
			<table id="usertable" border="1" cellpadding="5" cellspacing=0>
				<tbody>	
					<tr>
						<th>姓名</th>
						<th>email</th>
						<th>电话</th>
						<th>&nbsp;</th>
					</tr>
				</tbody>
			</table>
		</center>
	</body>
	<script>
	
		
			$("#addUser").click(function(){
				var name = $("#name").val();
				var email = $("#email").val();
				var tel = $("#tel").val();
				
				var $tr = $("<tr>"+
				"<td>"+name+"</td>"+
				"<td>"+email+"</td>"+
				"<td>"+tel+"</td>"+
				"<td><a href=''>删除</a><a href=''>保存</a></td>"
				+"</tr>");
				
				var $table = $("#usertable");
				$table.append($tr);
				
				
				$tr.children().children('a').eq(0).click(function(){
					alert("11");
			});
				$tr.children().children('a').eq(1).click(function(){

					
				});
			});
			
			
			
		
	
	</script>
	</html>
	